<% content_for :sidebar do %>
  <h1>Listing Roles</h1>
  <%= sidebar_button_link 'New Role', new_role_path unless cannot? :create, Role %>
<% end %>

<table id="roles" class="generic_datatable table table-striped table-bordered" >
  <thead>
    <tr>
      <th>Name</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @roles.each do |role| %>
      <tr>
        <td><%= link_to role.name, role %></td>
        <td><%= table_button_link 'Edit', edit_role_path(role) unless cannot? :update, role %></td>
     </tr>
    <% end %>
  </tbody>
</table>
